package org.example.new_hbps_backend_reconstruction.service;

import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.example.new_hbps_backend_reconstruction.common.results.R;
import org.example.new_hbps_backend_reconstruction.entity.PatientBaseEntity;
import org.example.new_hbps_backend_reconstruction.entity.request.ImportPatientBaseListRequest;
import org.springframework.validation.BindingResult;

import java.util.List;

/**
 * @author 丁利军
 * @date 2025年10月10日 10:15
 * @description TODO: 描述
 */
public interface PatientBaseService extends IService<PatientBaseEntity> {
    // 分页查询并按care字段降序排序
    IPage<PatientBaseEntity> pageByCare(Page<?> page);

    int countMalePatientsOver55(Long doctorUid);

    int countMalePatientsUnderEqual55(Long doctorUid);

    int countFemalePatientsOver65(Long doctorUid);

    int countFemalePatientsUnderEqual66(Long doctorUid);

    int ccountMalePatientsOver55(Long doctorUid);

    int ccountMalePatientsUnderEqual55(Long doctorUid);

    int ccountFemalePatientsOver65(Long doctorUid);

    int ccountFemalePatientsUnderEqual66(Long doctorUid);

    R importPatientBaseList(List<ImportPatientBaseListRequest> excelVOList,
                            BindingResult bindingResult);

    JSONObject getPatientStatistics(Long doctorUid);
    JSONObject getPatientbycareStatistics(Long doctorUid);

    String editPhysicalStrength(Long patientUid, int physicalStrength);
    JSONObject getPatientNameSexAge(Long patientUid);
}